<!DOCTYPE html><html><head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="format-detection" content="telephone=no">
    <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/zepto.js" charset="utf-8"></script>   
	<title>修改信息</title>
    <style type="text/css">
        * {
            outline: none;
            -webkit-tap-highlight-color: rgba(255, 0, 0, 0);
            vertical-align: baseline;
            font-style: normal;
        }

        body {
            margin: 0;
            padding: 0;
            font-size: 12px;
            font-family: Microsoft Yahei, Arial, Simsun, Helvetica, Segoe UI, sans-serif;
            color: #404040;
            background-color: #efeff4;
        }

        img {
            border: 0
        }

        ul, ol, li, dt, dl, dd {
            text-decoration: none;
            list-style: none;
            vertical-align: middle;
            margin: 0;
            padding: 0;
        }

        a,
        a:visited {
            color: #373737;
            text-decoration: none;
        }

        .blank {
            width: 100%;
            height: 20px;
        }
    </style>
</head>

<body>
    <style type="text/css">
        .blank {
            width: 100%;
            height: 20px;
        }

        .userinfoMain {
            width: 100%;
            background-color: #FFF;
            display: table;
        }

        .userinfoMain .userinfoItem {
            width: 96%;
            margin-left: 4%;
            height: 50px;
            line-height: 50px;
        }

        .userinfoMain .userinfoItem span {
            float: left;
            display: block;
            width: 80px;
            height: 50px;
            line-height: 50px;
            text-align: left;
            font-size: 14px;
        }

        .userinfoMain .userinfoItem {
            border-bottom: 1px solid #dbdbdb;
        }

        .userinfoMain .userinfoItem:last-child {
            border-bottom: none;
        }

        .userinfoMain .userinfoItem input {
            width: 210px;
            height: 30px;
            border: none;
            font-size: 14px;
        }

        button {
            width: 94%;
            margin: 0 3%;
            border: none;
            background: #08BA06;
            border-radius: 4px;
            height: 40px;
            line-height: 40px;
            font-size: 18px;
            color: #FFF;
            margin-top: 40px;
            outline: none
        }
    </style>


    <div id="contentbox" style="min-height: 576px;">
        <div class="blank"></div>

        <div class="userinfoMain">
        	
            <div class="userinfoItem">
                <span>
                	<?php 
	                	if($_GET['type']=='signature'){
	                		echo '个性签名';           		
	                	}elseif($_GET['type']=='wxaccount'){
	                		echo '微信号';
	                	}elseif($_GET['type']=='mobile'){
	                		echo '手机号';
	                	}elseif($_GET['type']=='contract'){
	                		echo '联系人';
	                	}
                	?>
                </span>
                <input class="info" placeholder="请填写信息" name="<?php if(isset($_GET['type'])){ echo $_GET['type'];}?>" value="<?php echo isset($output['user'][$_GET['type']])?$output['user'][$_GET['type']]:'';?>">
            </div>
            <div class="userinfoItem">
				<font style="color:red" id="msg"></font>
            </div>
        </div>
		<input type="hidden" name="user_id" value="<?php echo $output['user']['user_id'];?>">
        <button class="submit">确 认</button>
    </div>
    
    <script type="text/javascript">
        $(function () {
            $(".submit").on("click", function() {
                var field = $('.info').attr('name');
				var value = $('.info').attr('value');


				$.ajax({
					type:'post',
					url:'index.php?act=my&op=editinfo',
					data:{field:field,value:value},
					dataType:'json',
					success:function(data){
						if(data.state==1){
							location.href = 'index.php?act=my&op=home&uid=<?php echo $output['user']['user_id'];?>';
							return false;
						}else{
							$('#msg').html(data.error);
						}
					}
				});
            });

        });
    </script>
</body>
</html>